//
//  BasicSonTableViewCell.swift
//  koolcar
//
//  Created by kuaimaxiansheng on 2023/11/2.
//

import UIKit

class BasicSonTableViewCell: UITableViewCell {
    var titleLab: UILabel!
    var contentBtn: UIButton!
    
    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
        super.init(style: style, reuseIdentifier: reuseIdentifier)
        self.backgroundColor = .white
        self.selectionStyle = .none
        self.clipsToBounds = true
        self.initUI()
    }
    
    func initUI(){
        
        self.titleLab = UILabel(frame: .zero)
        self.titleLab.textColor = Theme.titleLabColor
        self.titleLab.font = UIFont(name: Theme.PingFangSCRegular, size: 14)
        self.contentView.addSubview(self.titleLab)
        
        self.contentBtn = UIButton(frame: .zero)
        self.contentBtn.setTitleColor(Theme.titleLabColor, for: .normal)
        self.contentBtn.titleLabel?.font = UIFont(name: Theme.PingFangSCRegular, size: 14)
        self.contentBtn.isUserInteractionEnabled = false
        self.contentView.addSubview(self.contentBtn)
       
        
        self.titleLab.snp.makeConstraints { make in
            make.left.equalTo(14)
            make.centerY.equalTo(self.contentView.centerY)
        }
        
        self.contentBtn.snp.makeConstraints { make in
            make.right.equalTo(-14)
            make.centerY.equalTo(self.contentView.centerY)
        }
        
    }
    
    
    
    
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

}
